#pragma once
#include "IAirlineServ.h"
#include "MsgSpliter.h"
class AirlineServ : public IAirlineServ
{
public:
	AirlineServ(SOCKET sock) : m_sock(sock) {}
	
	bool AirlineAuth(char szAccount[], char szPasswd[]);
	void ViewOrders(vector<ORDER_ENTRY>*& pVecRes);
	bool CancelOrder(int nOrderId);
	bool AddRoute(ROUT_ENTRY& route);
	void ViewRoutes(vector<ROUT_ENTRY>*& pVecRes);

	void DestroyOrders(vector<ORDER_ENTRY>* pVecRes) { delete pVecRes; }
	void DestroyRoutes(vector<ROUT_ENTRY>* pVecRes) { delete pVecRes; }

private:
	SOCKET m_sock;
	CMsgSpliter m_splitter;
};

